
//TypeNav导航的仓库
import { reqGetCategoryList } from "@/api"

const state = {
    //获取导航中的categoryList数组
    categoryList: []
}
const mutations = {
    updateCategoryList(state, newCategoryList) {
        state.categoryList = newCategoryList
    }
}
const actions = {
    async setActCategoryList(context) {
        const result = await reqGetCategoryList()


        context.commit('updateCategoryList', result.data)
    }
}
const getters = {}
export default {
    namespaced: true,
    state,
    mutations,
    actions,
    getters
}